/* 登录页面专用样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 动态背景粒子效果 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { 
    width: 80px; 
    height: 80px; 
    left: 10%; 
    animation-delay: 0s; 
}

.particle:nth-child(2) { 
    width: 60px; 
    height: 60px; 
    left: 20%; 
    animation-delay: 1s; 
}

.particle:nth-child(3) { 
    width: 100px; 
    height: 100px; 
    left: 35%; 
    animation-delay: 2s; 
}

.particle:nth-child(4) { 
    width: 40px; 
    height: 40px; 
    left: 50%; 
    animation-delay: 3s; 
}

.particle:nth-child(5) { 
    width: 70px; 
    height: 70px; 
    left: 65%; 
    animation-delay: 4s; 
}

.particle:nth-child(6) { 
    width: 90px; 
    height: 90px; 
    left: 80%; 
    animation-delay: 5s; 
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.7; 
    }
    50% { 
        transform: translateY(-100px) rotate(180deg); 
        opacity: 0.3; 
    }
}

/* 登录容器 */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

/* 登录卡片 */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片头部 */
.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px 30px;
    text-align: center;
    position: relative;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.system-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.system-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.system-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.system-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* 表单区域 */
.login-form {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.form-control {
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 15px 50px 15px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    width: 100%;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
    transform: translateY(-2px);
    outline: none;
}

.form-control::placeholder {
    color: #adb5bd;
    font-size: 0.95rem;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
    pointer-events: none;
}

/* 登录按钮 */
.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 错误消息样式 */
.alert {
    border-radius: 12px;
    border: none;
    margin-bottom: 20px;
    animation: shake 0.5s ease-in-out;
    padding: 15px;
    display: flex;
    align-items: center;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
}

/* 页脚 */
.login-footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* 加载动画 */
.loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 记住我选项 */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
    accent-color: #667eea;
}

.remember-me label {
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    user-select: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-container {
        max-width: 90%;
        padding: 10px;
    }
    
    .login-header {
        padding: 30px 20px 20px;
    }
    
    .system-logo {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .system-title {
        font-size: 1.5rem;
    }
    
    .login-form {
        padding: 30px 20px;
    }
    
    .form-control {
        padding: 12px 45px 12px 15px;
        font-size: 0.95rem;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        max-width: 95%;
        padding: 5px;
    }
    
    .login-header {
        padding: 25px 15px 15px;
    }
    
    .system-logo {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .system-title {
        font-size: 1.3rem;
    }
    
    .system-subtitle {
        font-size: 0.9rem;
    }
    
    .login-form {
        padding: 25px 15px;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(30, 30, 30, 0.95);
        color: #e9ecef;
    }
    
    .form-label {
        color: #e9ecef;
    }
    
    .form-control {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e9ecef;
    }
    
    .form-control::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }
    
    .form-control:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: #667eea;
    }
    
    .input-icon {
        color: rgba(255, 255, 255, 0.6);
    }
    
    .remember-me label {
        color: #adb5bd;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .login-card {
        border: 2px solid #000;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .login-btn {
        border: 2px solid #000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particle {
        animation: none;
    }
    
    .login-card {
        animation: none;
    }
}

/* 快速登录提示 */
.quick-login-hint {
    text-align: center;
    margin-top: 15px;
    padding: 8px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.quick-login-hint small {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-login-hint i {
    color: #667eea;
    margin-right: 4px;
}

/* 移动端隐藏快速登录提示 */
@media (max-width: 768px) {
    .quick-login-hint {
        display: none;
    }
}

/* 版本信息 */
.version-info {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    z-index: 1000;
}

/* 语言切换 */
.language-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-switch select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.language-switch select option {
    background: #333;
    color: white;
}

/* 系统状态指示器 */
.system-status {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #28a745;
    display: inline-block;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background: #dc3545;
}

.status-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 安全提示 */
.security-notice {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #856404;
    display: flex;
    align-items: center;
}

.security-notice i {
    color: #ffc107;
    margin-right: 8px;
    font-size: 1rem;
}

/* 暗色模式下的安全提示 */
@media (prefers-color-scheme: dark) {
    .security-notice {
        background: rgba(255, 193, 7, 0.15);
        color: #ffc107;
    }
}